Example phase 2 virtual trial for BMP4 + RT with distinct treatment arm populations
Authors
Nicholas Harbour
Markus Owen
Published
July 31, 2024, 11:55:38
Modified
July 31, 2024, 11:34:36
1 import packages and define functions
Code
import numpy as npimport matplotlib.pyplot as pltimport pandas as pdimport scipy.stats as statsfrom scipy.stats import lognormfrom numba import jitfrom sksurv.compare import compare_survivalfrom sksurv.nonparametric import kaplan_meier_estimator
all functions are in: “notebooks/gsc_model_functions.py”
Code
import gsc_model_functions as gmf
For this we need to load in the patient data and calualte the distribution params
Code
# load in the patient survival datahistoric_df = pd.read_csv("Rho_D_data.csv")censored_str ="Censorship (1=censored)"survival_str ="Overall Survival"# only keep patients that weren't censoredhistoric_df = historic_df[historic_df[censored_str] ==0]# cut off patients that had very high proliferation ratehistoric_df = historic_df[historic_df["PIHNA rho"] <100 ] historic_df[censored_str] =True# fit distribution to the datadist_name ='lognorm'# Replace with the desired distribution namedist =getattr(stats, dist_name)params = dist.fit(historic_df["PIHNA rho"])shape = params[0]loc = params[1]scale = params[-1]
2 Phase 2 virtual trial
For phase 2 trial we will assume a heterogenous population, so they will have differnt values of \(\psi\) based on some distribution. We will assume this is a truncated normal distibution. For different means of this normal distribution we will calculate the probability of a successful trial (significantly different from the virtual control).
3 Run trial with distinct BMP4 and no-BMP4 treatment populations
Figure 2: Fraction of successful trials for different mean psi values where the treatment arms with and without BMP4 are distinct sets drawn from the same distribution, rather than identical.
3.0.1 Plot mean survival vs mean psi values
Expect survival to increase as psi and hence BMP4 effect increases. We do see this within each trial, but the differences between trials are larger.
Figure 5: Fraction of successful trials for different mean psi values where the treatment arms with and without BMP4 are distinct sets drawn from the same distribution, rather than identical.
4.0.1 Plot mean survival vs mean psi values
Expect survival to increase as psi and hence BMP4 effect increases. We do see this within each trial, but the differences between trials are larger.
Figure 9: Fraction of successful trials for different mean psi values where the treatment arms with and without BMP4 are distinct sets drawn from the same distribution, rather than identical.